package com.example.springboot.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import javax.persistence.criteria.CriteriaBuilder;
import java.io.Serializable;

/**
 * 用户信息的实体类
 * @Author:wzf
 * @Data:2022/2/21
 * @Version:1.0
 */
@Entity(name = "wzf_user")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class User implements Serializable {


  /**
   * 序列化ID
   */
  private static final long serialVersionUID = 7960736613103521243L;
  /**
   * 用户ID
   * 主键
   */
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(length = 10)
  private Integer id;

  /**
   * 用户名称
   */
  @Column(length = 20)
  private String name;

  /**
   * 用户年龄
   */
  @Column(length = 20)
  private Integer age;

  /**
   * 用户邮箱
   */
  @Column(length = 40)
  private String email;

  @Transient
  private UserScope userScope;
}
